using NHibernate;
using Ninject;
using Ninject.Activation;

namespace Munim.Fame.DataAccess.Ninject.Providers
{
    public class SessionProvider : Provider<ISession>
    {
        protected override ISession CreateInstance(IContext context)
        {
            var sessionFactory = context.Kernel.Get<ISessionFactory>();
            return sessionFactory.OpenSession();
        }
    }
}